import efinance as ef
import matplotlib.pyplot as plt

def minuteStock(stock_code):
    freq=1
    df=ef.stock.get_quote_history(stock_code, klt=freq)
    df.to_csv(f'{stock_code}.csv',encoding='utf-8-sig', index=None)
    plt.plot(df['收盘'],'g')
    plt.show()

minuteStock('600519')